<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        Array.prototype.sum = function () {
            var sun = 0
            for (var i = 0; i < this.length; i++) {
                sun += this[i]
            }
            return sun
        }
        var arr = [11, 22, 33]
        console.log(arr.sum());
        var arr1 = new Array(11, 22, 33)
        console.log(arr1.sum());
        // var o = {
        //     name: 'anday'
        // }
        // console.log(Array.prototype);
        // console.log(Array(this));
    </script>
</body>

</html>